<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/mall/TravelAgents.js此处编写
 -->
<template>
  <div>
    <view-grid
      ref="grid"
      :columns="columns"
      :detail="detail"
      :editFormFields="editFormFields"
      :editFormFileds="editFormFields"
      :editFormOptions="editFormOptions"
      :searchFormFields="searchFormFields"
      :searchFormFileds="searchFormFields"
      :searchFormOptions="searchFormOptions"
      :table="table"
      :extend="extend"
    >
    </view-grid>
  </div>
</template>

<script>
import extend from "@/extension/mall/TravelAgentSecend.js";
import ViewGrid from "@/components/basic/ViewGrid.vue";
var vueParam = {
  components: {
    ViewGrid
  },
  data() {
    return {
      table: {
        key: "id",
        footer: "Foots",
        cnName: "二级分销商列表",
        name: "Mall_distributor_second",
        url: "/Mall_distributor_second/",
        sortName: "createDate"
      },
      extend: extend,
      editFormFields: {
        distributorName: "",
        contactPerson: "",
        contactPhone: "",
        timeContainer: [],
        creator: "",
        createID: "",
        createDate: "",
        modifier: "",
        modifyID: "",
        modifyDate: "",
        remark: "",
        merchantCode: '',
        merchantName: '',
        secondDistributorName: ''
      },
      editFormOptions: [
        [
          {
            title: "二级分销商名称",
            field: "secondDistributorName",
            type: "text",
            required: true,
          },
        ],
        [
          {
            title: "联系人",
            field: "contactPerson",
            type: "text"
          },
          {
            title: "联系人电话",
            field: "contactPhone",
            type: "text"
          }
        ],
        [
          {
            title: "起止时间",
            required: true,
            field: "timeContainer",
            colSize: 6,
            type: "datetime",
            range: true
          },
          {
            title: "备注",
            field: "remark",
            type: "text"
          }
        ]
      ],
      searchFormFields: {
        distributorName: "",
        contactPerson: "",
        contactPhone: "",
        createDate: ""
      },
      searchFormOptions: [
        [
          { title: "二级分销商名称", field: "distributorName", type: "like" },
          { title: "联系人", field: "contactPerson", type: "like" },
          { title: "联系人电话", field: "contactPhone", type: "like" }
        ],
        [{ title: "创建时间", field: "createDate", type: "datetime" }]
      ],
      columns: [
        {
          field: "secondDistributorName",
          title: "二级分销商名称",
          type: "int",
          width: 220,
          align: "left"
        },
        {
          field: "contactPerson",
          title: "联系人",
          type: "string",
          width: 120,
          align: "left"
        },
        {
          field: "contactPhone",
          title: "联系人电话",
          type: "string",
          width: 150,
          align: "left"
        },
        {
          field: "secondDistributorStartTime",
          title: "合约开始时间",
          type: "datetime",
          width: 220,
          align: "left",
          sortable: true
        },
        {
          field: "secondDistributorEndTime",
          title: "合约结束时间",
          type: "datetime",
          width: 220,
          align: "left",
          sortable: true
        },
        {
          field: "creator",
          title: "创建人",
          type: "string",
          width: 120,
          readonly: true,
          align: "left"
        },
        {
          field: "createDate",
          title: "创建时间",
          type: "datetime",
          width: 220,
          readonly: true,
          align: "left",
          sortable: true
        },
        {
          field: "modifier",
          title: "修改人",
          type: "string",
          width: 120,
          readonly: true,
          align: "left"
        },
        {
          field: "modifyDate",
          title: "修改时间",
          type: "datetime",
          width: 220,
          readonly: true,
          align: "left",
          sortable: true
        },
        {
          field: "accountsId",
          title: "应收账户",
          type: "string",
          width: 120,
          hidden: true,
          align: "left"
        },
        {
          field: "spare2",
          title: "扩展字段1",
          type: "string",
          width: 120,
          hidden: true,
          align: "left"
        },
        //   { field: 'spare15', title: '分销商封面图', type: 'string', width: 120, hidden: true, align: 'left' },
        {
          field: "spare14",
          title: "扩展字段1",
          type: "string",
          width: 120,
          hidden: true,
          align: "left"
        },
        {
          field: "spare13",
          title: "扩展字段1",
          type: "string",
          width: 120,
          hidden: true,
          align: "left"
        },
        {
          field: "spare12",
          title: "扩展字段1",
          type: "string",
          width: 120,
          hidden: true,
          align: "left"
        },
        {
          field: "spare11",
          title: "扩展字段1",
          type: "string",
          width: 120,
          hidden: true,
          align: "left"
        },
        {
          field: "spare10",
          title: "扩展字段1",
          type: "string",
          width: 120,
          hidden: true,
          align: "left"
        },
        {
          field: "roleId",
          title: "弃用",
          type: "int",
          width: 120,
          hidden: true,
          align: "left"
        },
        {
          field: "modifyID",
          title: "修改人ID",
          type: "int",
          width: 120,
          hidden: true,
          align: "left"
        },
        {
          field: "createID",
          title: "创建人ID",
          type: "int",
          width: 120,
          hidden: true,
          align: "left"
        },
        {
          field: "spare8",
          title: "扩展字段1",
          type: "string",
          width: 120,
          hidden: true,
          align: "left"
        },
        {
          field: "id",
          title: "主键",
          type: "string",
          width: 120,
          hidden: true,
          readonly: true,
          require: true,
          align: "left"
        },
        {
          field: "isDelete",
          title: "是否删除",
          type: "int",
          width: 120,
          hidden: true,
          require: true,
          align: "left"
        },
        {
          field: "spare9",
          title: "扩展字段1",
          type: "string",
          width: 120,
          hidden: true,
          align: "left"
        }
      ],
      detail: {
        cnName: "#detailCnName",
        columns: [],
        sortName: "",
        key: ""
      }
    };
  }
};
export default vueParam;
</script>
